﻿using System;
using System.Collections.Generic;
using System.Text;
using yb.commerce.DAL;
using yb.commerce.Model;
using System.Data;

namespace yb.commerce.BLL
{
    public class ProductRelateProductBusiness
    {
        public bool Add(ProductRelateProduct productRelateProduct)
        {
            return new ProductRelateProductDAO().Add(productRelateProduct);
        }

        public bool Delete(int Id)
        {
            return new ProductRelateProductDAO().Delete(Id);
        }

        public bool Update(ProductRelateProduct productRelateProduct)
        {
            return new ProductRelateProductDAO().Update(productRelateProduct);
        }

        public ProductRelateProduct GetEntity(int Id)
        {
            return new ProductRelateProductDAO().GetEntity(Id);
        }

        public DataRecordTable GetList(string fieldList, string orderField, bool orderBy, int pageIndex, int pageSize, string where)
        {
            return new ProductRelateProductDAO().GetList(fieldList,orderField,orderBy,pageIndex,pageSize,where);
        }

        public DataTable GetListByProductId(int productId)
        {
            return new ProductRelateProductDAO().GetListByProductId(productId);
        }
        public bool IsSameRecord(int productId, int relateProductId)
        {
            return new ProductRelateProductDAO().IsSameRecord(productId,relateProductId);
        }
    }
}
